<template>
  <div class="welcome" v-if="visible">
    <div class="welcome-wrap">
      <div class="welcome_first">
        <img class="welcome_first_img" src="~assets/images/tesila.png"/>
        <div class="welcome_first_risk-wrap">
          <input type="checkbox">
          <span>我已阅读<span class="welcome_first_risk-wrap_risk">《风险提示》</span></span>
        </div>
        <div class="welcome_first_btn-register-wrap">
          <span class="welcome_first_btn-register">注册就送<span class='welcome_first_btn-register_money'>100万</span>模拟炒股资金</span>
        </div>
        <div class="welcome_first_btn_unregister-wrap"><span class="welcome_first_btn_unregister">随便逛逛</span></div>
      </div>
      <div class="welcome_second">
        <div class="welcome_second_risk-wrap">
          <img class="welcome_second_risk-wrap_bg" src="~assets/images/jieshao.png">
          <div class="welcome_second_risk-wrap_content-wrap">
            <img class="welcome_second_risk-wrap_logo" src="~assets/images/logo@3x.png">
            <div class="welcome_second_risk-wrap_title">牛人牛股</div>
            <div class="welcome_second_risk-wrap_content">
              <div class="welcome_second_risk-wrap_content_title">模拟炒股风险提示</div>
              <div class="welcome_second_risk-wrap_content_1">社区的牛人模拟持仓展示仅供交流</div>
              <div class="welcome_second_risk-wrap_content_line"></div>
              <div class="welcome_second_risk-wrap_content_2">学习之用，<span>不代表投资建议。</span></div>
              <div class="welcome_second_risk-wrap_content_line"></div>
              <div class="welcome_second_risk-wrap_content_3">如用户选择转入实盘则需风险自担。</div>
              <div class="welcome_second_risk-wrap_content_line"></div>
              <div class="welcome_second_risk-wrap_content_4">用户在社区中获得的君元宝、勋章等</div>
              <div class="welcome_second_risk-wrap_content_line"></div>
              <div class="welcome_second_risk-wrap_content_5">奖励有一定时间的清算延迟和鉴别工</div>
              <div class="welcome_second_risk-wrap_content_line"></div>
              <div class="welcome_second_risk-wrap_content_6">作，国泰君安对用户奖励的发放与否</div>
              <div class="welcome_second_risk-wrap_content_line"></div>
              <div class="welcome_second_risk-wrap_content_6">和发放时间有最终解释权</div>
              <div class="welcome_second_risk-wrap_content_line"></div>
              <div class="welcome_second_risk-wrap_content_0"><i class="iconfont icon-warn"></i>股市有风险，入市需谨慎！</div>
              <div class="welcome_second_risk-wrap_content_line"></div>
            </div>
          </div>
        </div>
        <div class="welcome_second_btn-wrap"><span class="welcome_second_btn"  @click="welcomeHide">本王知道了</span></div>
      </div>
    </div>
  </div>
</template>

<script>
  import LocalDAO from 'common/localDAO'

  export default {
    data () {
      return {
        title: '牛人牛股',
        visible:false
      }
    },
    methods:{
      welcomeHide(){
        this.visible = false;
        LocalDAO.setIsFirst(false);
      }
    },
    created(){
        var vm = this,
            isFirst = LocalDAO.isFirst(),
            nickname = LocalDAO.getNickname() || "";

        if(isFirst == true && nickname === ""){
            vm.visible = true;
        }else{
            vm.visible = false;
        }
    }
  }
</script>

<style scoped>

</style>
